package cn.wolfcode.shop.mapper;

import cn.wolfcode.shop.domain.SeckillOrder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * Created by wolfcode-lanxw
 */
@Mapper
public interface SeckillOrderMapper {
    @Select("select * from t_seckill_order where user_id = #{userId} and good_id = #{goodId}")
    SeckillOrder getUserSeckillOrder(@Param("userId") Long userId, @Param("goodId") Long goodId);
    @Insert("insert into t_seckill_order(user_id,good_id,order_no) values (#{userId},#{goodId},#{orderNo})")
    void insert(SeckillOrder seckillOrder);
}
